package com.yonyou.crm.sys.region.ctrl;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.yonyou.crm.common.rest.util.ResponseUtil;
import com.yonyou.crm.sys.region.rmitf.IRegionsRmService;

@RestController
@RequestMapping(value = "/sys/regions")
public class RegionsCtrl{
	@Autowired
	private IRegionsRmService service;
	
	@RequestMapping(method = RequestMethod.GET)
	public Object getRegionCityDistrictData(){
		JSONObject rObj = new JSONObject();
		rObj.put("list", service.getRegionCityDistrictData());
		return ResponseUtil.getObject(rObj);
	}



	@RequestMapping(value="syncRegion")
	public void syncRegionJW(){
		service.syncRegionJW();
	}
}